package com.example.administrator.printoutindemo;

import org.json.JSONArray;
import org.json.JSONObject;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class OutStorageListlInfo implements Serializable {

    private String _projectname;
    private String _material;
    private String _receive_loginName;
    private String _receive_loginPwd;
    private String _out_storagelist_batchid;
    private String receive_userName;
    private String receive_userPhone;

    public String getReceive_userName() {
        return receive_userName;
    }

    public void setReceive_userName(String receive_userName) {
        this.receive_userName = receive_userName;
    }

    public String getReceive_userPhone() {
        return receive_userPhone;
    }

    public void setReceive_userPhone(String receive_userPhone) {
        this.receive_userPhone = receive_userPhone;
    }

    // 将JSON对象转化为list
    public List<OutStorageListlInfo> getListFromJSON(String JsonStr) {
        List<OutStorageListlInfo> clist = new ArrayList<OutStorageListlInfo>();

        try {

            JSONArray jay = new JSONArray(JsonStr);// 将字符串转化为JSON数组

            for (int i = 0; i < jay.length(); i++) {
                JSONObject temp = (JSONObject) jay.get(i);

                OutStorageListlInfo n = new OutStorageListlInfo();

                n.set_material(temp.getString("material"));
                n.set_projectname(temp.getString("projectname"));
                n.set_receive_loginName(temp.getString("receive_loginName"));
                n.set_receive_loginPwd(temp.getString("receive_loginPwd"));
                n.set_out_storagelist_batchid(temp.getString("out_storagelist_batchid"));
                n.setReceive_userName(temp.getString("receive_userName"));
                n.setReceive_userPhone(temp.getString("receive_userPhone"));
                clist.add(n);

            }

        } catch (Exception e) {
            e.printStackTrace();
        }

        return clist;

    }


    public String get_out_storagelist_batchid() {
        return _out_storagelist_batchid;
    }


    public void set_out_storagelist_batchid(String _out_storagelist_batchid) {
        this._out_storagelist_batchid = _out_storagelist_batchid;
    }


    public String get_projectname() {
        return _projectname;
    }

    public void set_projectname(String _projectname) {
        this._projectname = _projectname;
    }

    public String get_material() {
        return _material;
    }

    public void set_material(String _material) {
        this._material = _material;
    }

    public String get_receive_loginName() {
        return _receive_loginName;
    }

    public void set_receive_loginName(String _receive_loginName) {
        this._receive_loginName = _receive_loginName;
    }

    public String get_receive_loginPwd() {
        return _receive_loginPwd;
    }

    public void set_receive_loginPwd(String _receive_loginPwd) {
        this._receive_loginPwd = _receive_loginPwd;
    }


}